package cn.yunhe.action;

import cn.yunhe.util.BaseActionUtil;
import lombok.Data;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Calendar;
import java.util.Date;

@Data
public class LoginAction extends BaseActionUtil {
    private String username;
    private String password;

    public String login() throws IOException {
        PrintWriter out = getResponse().getWriter();
        Calendar calendar = Calendar.getInstance();
        Date time = calendar.getTime();
        out.print("<h2>用户注册信息如下:<hr/>用户名：" + username + "<br/>" +
                " 密码：" + password);
        out.print("注册时间为：" +time.toString());
        return null;
    }
}
